import {createWebHistory, createRouter} from "vue-router"
import routes from "./routes"
// import useTabsStore from "../store/tabs"
// import path from "path"
// import { title } from "process"

// let tabsStore:any = undefined

const router = createRouter({
    history: createWebHistory(),
    routes,
})

// router.beforeEach((to, from, next) => {
//     if (!tabsStore){
//         tabsStore = useTabsStore()
//     }
//     tabsStore.addTab({
//         path: to.path,
//         title:to.meta?.title??'未命名',
//     })
// })

export default router